#pragma once

#include "DynamicObject.h"

enum TankActionType
{
   eStayingStill=0,
   eMoving,
   eRotatingLeft,
   eRotatingRight
};

class Tank : public DynamicObject
{
   Q_OBJECT

public:
   Tank(const Tank&);
   Tank(const Tank &obj, bool copyScene);
   Tank(int PosX, int PosY, char Direction,int speed,double progres, int ID, int max_health);

   Tank& operator = (const Tank& obj);
   void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget);
   QRectF boundingRect() const
   {
       return(QRectF(0, 0, 50, 50));
   }

   int GetID();
   int GetHealth();
   QString GetNick();
   char GetCurrentAction();

   void SetID(int ID);
   void SetNick(QString Nick);
   void SetHealth(int Health);
   void SetCurrentAction(char Action);

   bool advanceAction(long duration);

public:
   int id;
   QString nick;
   int max_health;
   int health;

   char action;
};
